home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group95b.txt / 000079_icon-group-sender _Mon Jul 10 16:11:53 1995.msg < prev    next >
Internet Message Format  |  1995-09-18  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Mon, 10 Jul 1995 15:09:38 MST
  2. Date: Mon, 10 Jul 1995 16:11:53 -0500 (CDT)
  3. From: "Chris D. Tenaglia" <cdt@post.its.mcw.edu>
  4. To: icon-group@cs.arizona.edu
  5. Subject: DOS delay routine
  6. Message-Id: <Pine.ULT.3.90.950710160823.23822A-100000@post.its.mcw.edu>
  7. Mime-Version: 1.0
  8. Content-Type: TEXT/PLAIN; charset=US-ASCII
  9. Errors-To: icon-group-errors@cs.arizona.edu
  10.  
  11.  
  12. Running Icon V9 for MSDOS V6.2 on a 486/100 Compaq. I wrote
  13. a little routine to monitor things on a Novell LAN. I needed
  14. something to wait about 5 min. between checkups do I wrote
  15. a little delay route that waits in a little key sensing loop.
  16. Under unix there is a delay() builtin procedure.
  17.  
  18. In this routine it seems to get stuck waiting for the key.
  19. Has the key handler technique changed in this latest version?
  20. I haven't been able to coax it to working. Are there plans
  21. to incorporate such a builtin in DOS/Windows Icon in the
  22. future? Any suggestions as to a better or correct way?
  23. There are WAIT.COM programs but there's not much memory left
  24. for system("wait 00:00:05") type calls. On my PC, delay(2)
  25. waits about 5 minutes (or it used to), but now it just hangs.
  26. When ESC is pressed it exits through the halt procedure.
  27.  
  28. Thanx in advance,
  29.  
  30. Chris.
  31.  
  32. #
  33. # provide a time delay to limited amount of collected data
  34. #
  35. procedure delay(n)
  36.   target := n * 250000         # approx 5 min intervals
  37.   every i:= 1 to target do
  38.     {
  39.     if kbhit() then
  40.       {
  41.       kee := getch()
  42.       if kee == "\e" then halt("ESCAPED!")
  43.       }
  44.     22.0000/7.0000000
  45.     }
  46.   end
  47.  
  48.  
  49. Chris Tenaglia   (system manager)     |  cdt@post.its.mcw.edu
  50. Medical College of Wisconsin          |
  51. 8701 W. Watertown Plank Rd.           |  Ce que vous voyez est
  52. Milwaukee, WI 53226   (414)456-8765   |  ce que vous obtenez !
  53.  
  54.